package com.chuangjiangx.member.stored.ddd.domain.model;

import java.util.Objects;

/**
 * @author cj-ch
 * @date 2018/4/4 下午6:52
 */
public enum MbrOrderRefundStatus {

    FAILURE("失败", 0),
    SUCCESSFUL("成功", 1),
    PROCESSING("处理中", 2);

    public final String name;
    public final Integer value;

    MbrOrderRefundStatus(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    public static final MbrOrderRefundStatus of(Integer value){
        for(MbrOrderRefundStatus status : MbrOrderRefundStatus.values()){
            if(Objects.equals(status.value,value)){
                return status;
            }
        }
        return null;
    }


}
